package com.sixth.statistics.controller;

import com.sixth.core.entity.OrderChargeItem;
import com.sixth.core.vo.R;
import com.sixth.statistics.service.OrderChargeItemService;
import com.sixth.statistics.vo.OrderChargeItemVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @program: six-hospital-system
 * @description: 收费项目控制器
 * @author: 朱永奇
 * @create: 2024-08-21 11:00
 **/
@Api(tags = "收入金额统计")
@RestController
@RequestMapping("/statistics/orderChargeItem")
public class OrderChargeItemController {

    @Autowired
    private OrderChargeItemService orderChargeItemService;

    @ApiOperation(value = "获取总收入", notes = "根据传入的 OrderChargeItemVo 对象获取总收入金额列表")
    @PostMapping("/list")
    public R<List<OrderChargeItem>> listR(@RequestBody OrderChargeItemVo orderChargeItemVo) {
        return orderChargeItemService.selectAll(orderChargeItemVo);
    }

    @ApiOperation(value = "获取收入详情", notes = "根据传入的 OrderChargeItemVo 对象获取收入详情列表")
    @PostMapping("/ListOrder")
    public R<List<OrderChargeItem>> list(@RequestBody OrderChargeItemVo orderChargeItemVo) {
        return orderChargeItemService.selectAllOrder(orderChargeItemVo);
    }
}
